<?php

namespace App\Admin\Support;


use App\Admin\Repositories\GrGood;
use App\Models\OrderGoods;
use Dcat\Admin\Support\LazyRenderable;
use Dcat\Admin\Widgets\Table;

class GoodsInfo extends LazyRenderable
{
    public function render()
    {
        // 获取ID
        $goods_id = $this->id;
        $data = \App\Models\GrGood::whereIn('goods_id',$goods_id)->select('goods_id','goods_name','goods_now_price')->get()->toArray();
        $titles = [
            '商品id',
            '商品名字',
            '商品价格'
        ];
        return Table::make($titles, $data);
    }
}
